<script type="text/javascript">
var successFun=function(res){
if(res.code==200){
	alert('更新成功！');
	document.location.reload();
}else{
	alert('出错了！');
}
}
$(document).ready(function() { 
	var updateOptions	= {dataType:'json',error:doError,success:doSuccess}
    $('#form').ajaxForm(updateOptions); 
}); 
</script>
<div class="content">
	<div class="simplebox grid740">
    	<div class="titleh">
        	<h3>网站设置</h3>
        </div>
        <div class="body">
          <form id="form" action="{url('Setting','SaveSite')}" method="post">
          	<div class="st-form-line">	
            	<span class="st-labeltext">网站名称</span>	
                <input type="text" style="width: 300px;" class="st-forminput" name="sitename" id="sitename-input" value="{$info['sitename']}"> 
                <div class="clear"></div>
                <div class="st-form-error" id="sitename-info" etype="error-info"></div>
            	<div class="clear"></div>
            </div>
            
            <div class="st-form-line">	
            	<span class="st-labeltext">网站Logo</span>	
                <input type="file" style="width: 300px;" class="uniform" name="logo" id="logo-input" value="{$info['logo']}">
                {if !empty($info['logo'])}
                <div class="clear"></div>
                <img src="{$baseurl}{$info['logo']}" />
                {/if} 
                <div class="clear"></div>
                <div class="st-form-error" id="logo-info" etype="error-info"></div>
            	<div class="clear"></div>
            </div>
          
          	<div class="st-form-line">	
            	<span class="st-labeltext">备案信息</span>	
                <input type="text" style="width: 300px;" class="st-forminput" name="beian" id="beian-input" value="{$info['beian']}"> 
                <div class="clear"></div>
                <div class="st-form-error" id="beian-info" etype="error-info"></div>
            	<div class="clear"></div>
            </div>
            
            <div class="st-form-line">	
            	<span class="st-labeltext">站长Email</span>	
                <input type="text" style="width: 300px;" class="st-forminput" name="email" id="email-input" value="{$info['email']}"> 
                <div class="clear"></div>
                <div class="st-form-error" id="email-info" etype="error-info"></div>
            	<div class="clear"></div>
            </div>
            
            <div class="st-form-line">	
            	<span class="st-labeltext">站长qq</span>	
                <input type="text" style="width: 300px;" class="st-forminput" name="qq" id="qq-input" value="{$info['qq']}"> 
                <div class="clear"></div>
                <div class="st-form-error" id="qq-info" etype="error-info"></div>
            	<div class="clear"></div>
            </div>
            
            <div class="st-form-line">	
            	<span class="st-labeltext">站长旺旺</span>	
                <input type="text" style="width: 300px;" class="st-forminput" name="wangwang" id="wangwang-input" value="{$info['wangwang']}"> 
                <div class="clear"></div>
                <div class="st-form-error" id="wangwang-info" etype="error-info"></div>
            	<div class="clear"></div>
            </div>
            
            <div class="st-form-line">	
            	<span class="st-labeltext">统计代码</span>	
            	<textarea class="st-forminput" name="tongji" id="tongji-input" style="width:300px" rows="5">{$info['tongji']}</textarea>
                <div class="clear"></div>
                <div class="st-form-error" id="tongji-info" etype="error-info"></div>
            	<div class="clear"></div>
            </div>
            
            <div class="st-form-line">	
            	<span class="st-labeltext">编码设置</span>	
            	<select name="encode">
				<option value="UTF-8" {if $info['encode']=='UTF-8'}selected{/if}>UTF-8</option>
				<option value="GB2312" {if $info['encode']=='GB2312'}selected{/if}>GB2312</option>
				<option value="GBK" {if $info['encode']=='GBK'}selected{/if}>GBK</option>
				<option value="BIG5" {if $info['encode']=='BIG5'}selected{/if}>BIG5</option>
				<option value="EUC-CN" {if $info['encode']=='EUC-CN'}selected{/if}>EUC-CN</option>
				<option value="ASCII" {if $info['encode']=='ASCII'}selected{/if}>ASCII</option>
				</select>
				如果你的网站搜索不到分享数据，那么尝试切换该编码
                <div class="clear"></div>
                <div class="st-form-error" id="encode-info" etype="error-info"></div>
            	<div class="clear"></div>
            </div>
            
            <div class="st-form-line">	
            	<span class="st-labeltext">登录IP认证</span>	
            	<input type="checkbox" name="ipcheck" value="1" class="uniform" {if $info['ipcheck']}checked{/if}> 选中后开启认证
                <div class="clear"></div>
                <div class="st-form-error" id="tongji-info" etype="error-info">开启IP认证将提高系统的安全性，我们强烈建议开启这个选项，但是部分用户在开启这个选项后使用后台时会经常要求重新登录，那需要关闭这个选项</div>
            	<div class="clear"></div>
            </div>
            
            <div class="button-box">
           	  <input type="submit" class="st-button" value="确认">
           	  <input type="reset" class="st-clear" value="取消">
            </div>
          </form>
        </div>
    </div>
</div>